//
// Created by 49647 on 2021/5/23.
//
#include <iostream>
using namespace std;

class A {
public:
    A(int a) : m(a) {
        printf("A(), m=%d\n", m);
    }
    A(const A &) = default;
    A(A &&) = default;
    ~A() {
        printf("~A(), m=%d\n", m);
    }

private:
    int m;
};

int main() {
    A a1(1);
    move(a1);  //move将a1从左值转换为右值，但它并不会在离开此行后被析构
    A a2(2);
}
